//
// Copyright (c) 2024 BPer
//
#ifndef SRC_BPERRTC_BPERPLAYTRACK_H_
#define SRC_BPERRTC_BPERPLAYTRACK_H_
#include <bperrtc/BPerPlayTrackH.h>

void bPer_create_playTrack(BPerRtcContext* context,BPerPlayTrack* track,int is_audio);
void bPer_destroy_playTrack(BPerPlayTrack *track);
int32_t bPer_playtrack_do_check_send_nacks(BPerRtcContext *context,
		BPerPlayTrack *track, uint32_t *timeout_nacks);
int32_t bPer_playtrack_on_nack(BPerRtcContext* context,BPerPlayTrack* track,BPerRtpPacket *pkt);
int32_t bPer_playtrack_send_rtcp_rr(BPerRtcContext* context,BPerBool isAudio,BPerPlayTrack* track);
int32_t bPer_playtrack_send_rtcp_xr_rrtr(BPerRtcContext* context,BPerPlayTrack* track);
int32_t bPer_playtrack_has_ssrc(BPerRtcContext* context,BPerPlayTrack* track,uint32_t ssrc);
void bPer_playtrack_update_rtt(BPerPlayTrack* track,int32_t rtt);

void bPer_playtrack_update_send_report_time(BPerPlayTrack* recv, BPerNtp* ntp,	uint32_t rtp_time);
void bPer_playtrack_receiveVideo(BPerRtcContext *context,BPerFrame *videoFrame) ;


#endif /* SRC_BPERRTC_BPERPLAYTRACK_H_ */
